<script type="text/javascript">
    function onCheckClick(ckContent)
    {
        if(ckContent.checked)
            ckContent.value="true";
        else
            ckContent.value="false"
        if(ckContent.name=="ckFocusContent")
        {
            //var url = "<?php echo url_for("other/focus"); ?>" + "?random=" +  Math.random() + "&catalogId=1000&contentTypeId=1000";
            //var focusId = window.showModalDialog(url,null,"dialogWidth:800px;dialogHeight:400px;help:0;status:0;scroll:1;center:1;resizeable:off;");
            //if(focusId != null)
              //$("#txtHideFocusId").val(focusId);
            if(ckContent.checked)
                $("#trFocus").css("display","block");
            else
                $("#trFocus").css("display","none");
        }
    }
</script>
<div>
	<form id="form1" name="form1" method="post">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
			<td class="newsTd">美图发布：</td>
			<td align="right" style="padding-right:300px"><input name="btnBack" type="button" value="取 消" onclick="history.go(-1);" /></td>
		  </tr>
		  <tr>
			<td class="newsTd">栏目：</td>
			<td><label>
              <?php
        @include_component("other","catalog",array("selectedId"=>$sf_request->getParameter("catalogId")));
        ?>
            </label></td>
		  </tr>
		  <tr>
			<td class="newsTd">文档属性：</td>
		    <td>推荐
      <input type="checkbox" name="ckRecommendContent" value="false" onclick="onCheckClick(this)" />&nbsp;&nbsp;&nbsp;
			  焦点
			  <input type="checkbox" name="ckFocusContent" value="false" onclick="onCheckClick(this)" />&nbsp;&nbsp;&nbsp;
              置顶
              <input type="checkbox" name="ckTop" value="false" onclick="onCheckClick(this)" />
&nbsp;&nbsp;</td>
		  </tr>
		  <tr>
        <td colspan="6">
            <div style="display:none;" id="trFocus">
            <?php echo include_component("other","focus"); ?>    </div>        </td>
    </tr>
		  <tr>
		    <td class="newsTd">相册名称：</td>
			<td><label>
              <input type="text" name="title" />
              </label>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="newsTd">来源：</span>
<input type="text" name="sources" /></td>
		  </tr>
		  <tr>
			<td colspan="2"><table width="90%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td width="62px" height="25px">TAG标签：</td>
                <td><input name="tag" type="text" size="30" /></td>
				<td width="70%" rowspan="2">多个关键字和TAG标签，请以“，”分隔</td>
			  </tr>
			  <tr>
				<td width="62px" height="25px" align="right">关键字：</td>
                <td><input type="text" name="keyword" size="30" /></td>
			  </tr>
			</table></td>
		  </tr>
		  <tr>
		    <td class="newsTd">缩略图：</td>
			<td><label>
			<input type="text" id="Txt0" name="Txt0" value="" />
                <input name="button" type="button"  onclick="getFileUrlFromCKFinder('Txt0','Img0')" value="浏览" />
</label></td>
		  </tr>
          <tr>
              <td colspan="2"><table width="90%" height="53" border="0" cellpadding="0" cellspacing="0">
			  <tr>
				<td><img id="Img0" src="" name="Img0" alt='256*256' width="256" height="256" /></td>
				</tr>
			      </table></td>
          </tr>
		  		  <tr>
		    <td colspan="2"><br />
		      <input type="checkbox" name="firstPhoto" value="1" />
图集第一幅图
  <label></label></td>
		  </tr>
		  <tr>
		    <td colspan="2"><br />
		      图集内容：
	        <label></label></td></tr>
            <tr id="tr1">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 1 </td>
          <td rowspan="3" align="left"><img id="Img1" name="Img1" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt1" name="Txt1" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt1','Img1')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des1" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                       <tr id="tr2">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 2 </td>
          <td rowspan="3" align="left"><img id="Img2" name="Img2" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt2" name="Txt2" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt2','Img2')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des2" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                       <tr id="tr3">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 3 </td>
          <td rowspan="3" align="left"><img id="Img3" name="Img3" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt3" name="Txt3" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt3','Img3')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des3" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                       <tr id="tr4">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 4 </td>
          <td rowspan="3" align="left"><img id="Img4" name="Img4" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt4" name="Txt4" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt4','Img4')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des4" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                       <tr id="tr5">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 5 </td>
          <td rowspan="3" align="left"><img id="Img5" name="Img5" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt5" name="Txt5" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt5','Img5')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des5" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr6" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 6 </td>
          <td rowspan="3" align="left"><img id="Img6" name="Img6" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt6" name="Txt6" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt6','Img6')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des6" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr7" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 7 </td>
          <td rowspan="3" align="left"><img id="Img7" name="Img7" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt7" name="Txt7" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt7','Img7')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des7" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr8" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 8 </td>
          <td rowspan="3" align="left"><img id="Img8" name="Img8" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt8" name="Txt8" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt8','Img8')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des8" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr9" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 9 </td>
          <td rowspan="3" align="left"><img id="Img9" name="Img9" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt9" name="Txt9" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt9','Img9')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des9" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr10" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 10 </td>
          <td rowspan="3" align="left"><img id="Img10" name="Img10" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt10" name="Txt10" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt10','Img10')" value="浏览" />
                    </label></td>
          </tr>
                <tr>

                  <td><p>图片简介：<br />
                    <textarea name="Des10" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr11" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 11 </td>
          <td rowspan="3" align="left"><img id="Img11" name="Img11" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt11" name="Txt11" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt11','Img11')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des11" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr12" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 12 </td>
          <td rowspan="3" align="left"><img id="Img12" name="Img12" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt12" name="Txt12" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt12','Img12')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des12" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr13" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 13 </td>
          <td rowspan="3" align="left"><img id="Img13" name="Img13" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt13" name="Txt13" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt13','Img13')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des13" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr14" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 14 </td>
          <td rowspan="3" align="left"><img id="Img14" name="Img14" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt14" name="Txt14" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt14','Img14')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des14" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>
                     <tr id="tr15" style="display:none;">
              <td colspan="3"><br />
              <table width="100%" cellSpacing="0" border="0">
                <tr>
                  <td width="30%">图片 15 </td>
          <td rowspan="3" align="left"><img id="Img15" name="Img15" width="241" height="120" alt="241X120" /></td>
        </tr>
                <tr>
                  <td>本地上传：
                    <label>
                      <input type="text" id="Txt15" name="Txt15" value="" />
                      <input name="button2" type="button"  onclick="getFileUrlFromCKFinder('Txt15','Img15')" value="浏览" />
                    </label></td>
          </tr>
                <tr>
                  <td><p>图片简介：<br />
                    <textarea name="Des15" cols="40" rows="4"></textarea>
                    </p></td>
          </tr>
              </table></td></tr>

          <tr>
		  		    <td colspan="2"><br>
<input id="addImgs" type="button" value="增加图片" onclick="addImg();" /><input id="hidAdd" type="hidden" value="5" /></td>
		  </tr>
            <tr>
		    <td class="newsTd"><br />
		      是否审核：</td>
			<td><label> <br />
			<input type="radio" name="check" value="1000" readonly=""/>
			是&nbsp;&nbsp;&nbsp;
            <input type="radio" name="check" value="1004" readonly="" checked="checked"/>
            否&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                发布时间：
                <input type="text" name="nowtime" id="nowtime" value="<?php echo date("Y-m-d H:i:s");?>" />
                &nbsp;&nbsp;
                <input name="button2" type="button" onclick="$('#nowtime').val(getCurrentDateTimeStr());" value="设为当前时间"/>
			</label></td>
		  </tr>
		  <tr>
		  		    <td colspan="2"><br />
		  		      点击率：0
&nbsp;&nbsp;&nbsp;点击调整：
<input name="hitMark" type="text" size="10" value="0" />
<label></label></td>
		  </tr>
          <tr>
			<td align="center" colspan="2" style="height:50px;"><input type="hidden" name="albumEdit" id="albumEdit" value="1" />
                <input name="btnAdd" type="submit" id="btnAdd" value="添 加" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="btnBack" type="button" value="取 消" onclick="history.go(-1);" /><input name="btnPublish" type="submit" id="btnPublish" value="发 布" style="display:none;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
		  </tr>
	  </table>
  </form>
</div>
<script type="text/javascript">
    function addImg()
    {
        if($("#hidAdd").attr("value")<15){
            var imgnum=parseInt($("#hidAdd").attr("value"));
            for(var i=(imgnum+1);i<=(imgnum+5);i++){
               $("#tr"+i).attr("style","block");
            }
            $("#hidAdd").attr("value",(imgnum+5));
            if($("#hidAdd").attr("value")>=15)
            {
                $("#addImgs").attr("disabled",true);
                $("#addImgs").attr("value","图片个数已达上限");
            }
        }else{
        $("#addImgs").attr("disabled",true);
        $("#addImgs").attr("value","图片个数已达上限");
        }
    }
</script>
